package com.mashibing.controller;

import com.mashibing.internalcommon.dto.ResponseResult;
import com.mashibing.internalcommon.request.VerificationCodeDTO;
import com.mashibing.service.VerificationCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/verificationCode")
public class verificationCodeController {

    @Autowired
    private VerificationCodeService verificationCodeService;

    @GetMapping("/generatorCode")
    public ResponseResult<Void> generatorCode(@RequestBody VerificationCodeDTO verificationCodeDTO) {
        return verificationCodeService.generatorCode(verificationCodeDTO);
    }

    @PostMapping("/checkVerificationCode")
    public ResponseResult checkVerificationCode(@RequestBody VerificationCodeDTO verificationCodeDTO) {
        return verificationCodeService.checkVerificationCode(verificationCodeDTO);
    }
}
